<?php
namespace Home\Controller;
use Think\Controller;
use Think\Log;
class IndexController extends Controller {
    public function index(){
     
        $foodModel = M('food');
        $res = $foodModel->limit(4)->order("hittime desc")->select();
        $this->food=$res;
    	$res2=$foodModel->limit(4)->order("hittime desc")->where('tid=1')->select();
        $this->food2=$res2;
        //var_dump($res2);
        $res3=$foodModel->limit(4)->order("hittime desc")->where("tid=2")->select();
        $this->food3=$res3;
        $res4=$foodModel->limit(4)->order("hittime desc")->where("tid=3")->select();
        $this->food4=$res4;
        $res5=$foodModel->limit(4)->order("hittime desc")->where("tid=4")->select();
        $this->food5=$res5;
    	$this->display();
    }
        public function detail(){
      /*  $data["id"]=I('get.id');
        $this->goodsDetail=M("goods")->where($data)->find();*/
        $this->display();
    }

}